<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>外边距</title>
    <style>
        /* margin 让盒子与盒子之间有间距，用法和 padding 一样 */
        div {
            width: 240px;
            height: 140px;
            line-height: 140px;
            text-align: center;
            display: inline-block;
            margin-right: 20px;
            background-color: pink;
        }
    </style>
</head>

<body>
    <div class="one">1</div>
    <div class="two">2</div>
</body>

</html>